﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Style x:Key="OpacityImageButton" TargetType="{x:Type Button}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Image Source="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}" 
                           Width="{Binding Width, RelativeSource={RelativeSource TemplatedParent}}">
                        <Image.Style>
                            <Style TargetType="{x:Type Image}">
                                <Style.Triggers>
                                    <Trigger Property="IsMouseOver" Value="True">
                                        <Setter Property="Opacity" Value="0.6" />
                                    </Trigger>
                                    <Trigger Property="IsEnabled" Value="False">
                                        <Setter Property="Opacity" Value="0.3" />
                                    </Trigger>
                                </Style.Triggers>
                                <Setter Property="Opacity" Value="1" />
                            </Style>
                        </Image.Style>
                    </Image>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="NavigationButton" TargetType="{x:Type Button}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border x:Name="ContainerBorder" Padding="10">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Image x:Name="NavigationImage" Source="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}" Width="58" />
                            <Label x:Name="ContentLabel" Grid.Row="1" Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" 
                                   Margin="0" VerticalContentAlignment="Top" HorizontalAlignment="Center"
                                   Foreground="White" FontFamily="Haettenschweiler" FontSize="24" FontWeight="Bold" />
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="NavigationImage" Property="Opacity" Value="0.3" />
                            <Setter TargetName="ContentLabel" Property="Opacity" Value="0.3" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="ContainerBorder" Property="Opacity" Value="0.6" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="LinkButton" TargetType="{x:Type Button}">
        <Style.Triggers>
            <DataTrigger Binding="{Binding Content, RelativeSource={RelativeSource Self}}" Value="">
                <Setter Property="IsEnabled" Value="False" />
            </DataTrigger>
        </Style.Triggers>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border x:Name="Container" Background="AliceBlue" Padding="4">
                        <TextBlock x:Name="ContentTextBlock" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="ContentTextBlock" Property="Foreground" Value="White" />
                            <Setter TargetName="Container" Property="Background" Value="SkyBlue" />
                        </Trigger>
                        <Trigger Property="Content" Value="{x:Null}">
                            <Setter Property="IsEnabled" Value="False" />
                            <Setter TargetName="Container" Property="Background" Value="#efefef" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RegularButton" TargetType="{x:Type Button}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border x:Name="Container" BorderThickness="1" BorderBrush="Black" Background="#5c90c8" Padding="4" CornerRadius="2">
                        <TextBlock x:Name="ContentTextBlock" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"
                                   FontSize="16" Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="ContentTextBlock" Property="Foreground" Value="Black" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="ContentTextBlock" Property="Foreground" Value="DarkGray" />
                            <Setter TargetName="Container" Property="LayoutTransform">
                                <Setter.Value>
                                    <TranslateTransform Y="-20" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>